﻿#include <iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n, x[100], y[100] = {},fg=2,num=0;//数组y 0左1右
	cin >> n;
	if (n == 0) { cout << 0; return 0; }
	y[0] = 1; y[n-1] = 0;
	for (int i = 0; i < n; i++)cin >> x[i];
	sort(x, x + n - 1);//将位置排序
	for (int i = 1; i < n - 1; i++)if (x[i] - x[i - 1] > x[i + 1] - x[i])y[i] = 1;//确定每个位置的朝向
	for (int i = 0; i < n - 1; i++)
		if (fg != y[i]) 
		{ num++; fg = y[i+1]; }//同一方向 看为一组(一组一个球
	cout << num;
}